﻿<Window x:Class="PropertyTools.Wpf.AboutDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" MinHeight="300" MinWidth="550" Padding="16"
        WindowStartupLocation="CenterScreen" SizeToContent="WidthAndHeight" ResizeMode="NoResize">
  <Grid>
    <Grid.RowDefinitions>
      <RowDefinition Height="*" />
      <RowDefinition Height="*" />
    </Grid.RowDefinitions>
    <Image Source="{Binding Image}" MaxHeight="128" Margin="0 0 8 0" VerticalAlignment="Center"
           HorizontalAlignment="Right" />
    <StackPanel Orientation="Vertical" Margin="8 8 0 0">
      <TextBlock FontSize="30" Text="{Binding ProductName}" />
      <TextBlock Text="{Binding Version}" Margin="0 4 0 0" />
      <TextBlock Text="{Binding Company}" Margin="0 4 0 0" />
    </StackPanel>
    <Border BorderThickness="0 1 0 0" BorderBrush="Gray" Grid.Row="1"
            Background="{DynamicResource {x:Static SystemColors.ControlBrushKey}}">
      <Grid>
        <StackPanel Grid.Row="1" Orientation="Vertical" Margin="8">
          <TextBlock Text="{Binding Copyright}" />
          <TextBlock Text="{Binding Comments}" TextWrapping="Wrap" />
        </StackPanel>
        <TextBlock Text="{Binding UpdateStatus}" VerticalAlignment="Bottom" Margin="8" />

        <StackPanel HorizontalAlignment="Right" VerticalAlignment="Bottom" Orientation="Horizontal" Margin="8">
          <Button Content="Ok" Width="96" IsDefault="True" Click="OkClick" />
        </StackPanel>
      </Grid>
    </Border>
    <Grid.ContextMenu>
      <ContextMenu>
        <MenuItem Header="{Binding SystemInfoText}" Click="SystemInfoClick" />
        <MenuItem Header="{Binding CopyReportText}" Click="CopyClick" />
      </ContextMenu>
    </Grid.ContextMenu>
  </Grid>
</Window>